eliminate queue_clears or queue_draws where we know that expose events
authorTim Janik <timj@gtk.org>
Wed, 13 Jan 1999 12:39:17 +0000 (12:39 +0000)
committerTim Janik <timj@src.gnome.org>
Wed, 13 Jan 1999 12:39:17 +0000 (12:39 +0000)
Wed Jan 13 13:28:00 1999  Tim Janik  <timj@gtk.org>

        * gtk/gtkwidget.c: eliminate queue_clears or queue_draws where we know
        that expose events will be generated.
        (gtk_widget_map): only queue_draw for NO_WINDOW widgets.
        (gtk_widget_unmap): only queue_clear_child for NO_WINDOW widgets.
        (gtk_widget_size_allocate): we don't need a queue_clear on changing
        allocations of !NO_WINDOW widgets, we do still need a full redraw for
        them though.

        * gtk/gtklabel.c (gtk_label_set_text): check whether the new string
        actually differs from the original.

ChangeLog
ChangeLog.pre-2-0
ChangeLog.pre-2-10
ChangeLog.pre-2-2
ChangeLog.pre-2-4
ChangeLog.pre-2-6
ChangeLog.pre-2-8
acconfig.h
gtk/gtklabel.c
gtk/gtkwidget.c
stamp-h.in

index 792519b0eb441aea8294eb4132b6fa1711c58890..58d92d6bc0c653d964528d43731e38174c960887 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,16 @@
+Wed Jan 13 13:28:00 1999  Tim Janik  <timj@gtk.org>
+
+       * gtk/gtkwidget.c: eliminate queue_clears or queue_draws where we know
+       that expose events will be generated.
+       (gtk_widget_map): only queue_draw for NO_WINDOW widgets.
+       (gtk_widget_unmap): only queue_clear_child for NO_WINDOW widgets.
+       (gtk_widget_size_allocate): we don't need a queue_clear on changing
+       allocations of !NO_WINDOW widgets, we do still need a full redraw for
+       them though.
+
+       * gtk/gtklabel.c (gtk_label_set_text): check whether the new string
+       actually differs from the original.
+
 Tue Jan 12 22:50:44 PST 1999 Manish Singh <yosh@gimp.org>
 
        * acinclude.m4
index 792519b0eb441aea8294eb4132b6fa1711c58890..58d92d6bc0c653d964528d43731e38174c960887 100644 (file)
@@ -1,3 +1,16 @@
+Wed Jan 13 13:28:00 1999  Tim Janik  <timj@gtk.org>
+
+       * gtk/gtkwidget.c: eliminate queue_clears or queue_draws where we know
+       that expose events will be generated.
+       (gtk_widget_map): only queue_draw for NO_WINDOW widgets.
+       (gtk_widget_unmap): only queue_clear_child for NO_WINDOW widgets.
+       (gtk_widget_size_allocate): we don't need a queue_clear on changing
+       allocations of !NO_WINDOW widgets, we do still need a full redraw for
+       them though.
+
+       * gtk/gtklabel.c (gtk_label_set_text): check whether the new string
+       actually differs from the original.
+
 Tue Jan 12 22:50:44 PST 1999 Manish Singh <yosh@gimp.org>
 
        * acinclude.m4
index 792519b0eb441aea8294eb4132b6fa1711c58890..58d92d6bc0c653d964528d43731e38174c960887 100644 (file)
@@ -1,3 +1,16 @@
+Wed Jan 13 13:28:00 1999  Tim Janik  <timj@gtk.org>
+
+       * gtk/gtkwidget.c: eliminate queue_clears or queue_draws where we know
+       that expose events will be generated.
+       (gtk_widget_map): only queue_draw for NO_WINDOW widgets.
+       (gtk_widget_unmap): only queue_clear_child for NO_WINDOW widgets.
+       (gtk_widget_size_allocate): we don't need a queue_clear on changing
+       allocations of !NO_WINDOW widgets, we do still need a full redraw for
+       them though.
+
+       * gtk/gtklabel.c (gtk_label_set_text): check whether the new string
+       actually differs from the original.
+
 Tue Jan 12 22:50:44 PST 1999 Manish Singh <yosh@gimp.org>
 
        * acinclude.m4
index 792519b0eb441aea8294eb4132b6fa1711c58890..58d92d6bc0c653d964528d43731e38174c960887 100644 (file)
@@ -1,3 +1,16 @@
+Wed Jan 13 13:28:00 1999  Tim Janik  <timj@gtk.org>
+
+       * gtk/gtkwidget.c: eliminate queue_clears or queue_draws where we know
+       that expose events will be generated.
+       (gtk_widget_map): only queue_draw for NO_WINDOW widgets.
+       (gtk_widget_unmap): only queue_clear_child for NO_WINDOW widgets.
+       (gtk_widget_size_allocate): we don't need a queue_clear on changing
+       allocations of !NO_WINDOW widgets, we do still need a full redraw for
+       them though.
+
+       * gtk/gtklabel.c (gtk_label_set_text): check whether the new string
+       actually differs from the original.
+
 Tue Jan 12 22:50:44 PST 1999 Manish Singh <yosh@gimp.org>
 
        * acinclude.m4
index 792519b0eb441aea8294eb4132b6fa1711c58890..58d92d6bc0c653d964528d43731e38174c960887 100644 (file)
@@ -1,3 +1,16 @@
+Wed Jan 13 13:28:00 1999  Tim Janik  <timj@gtk.org>
+
+       * gtk/gtkwidget.c: eliminate queue_clears or queue_draws where we know
+       that expose events will be generated.
+       (gtk_widget_map): only queue_draw for NO_WINDOW widgets.
+       (gtk_widget_unmap): only queue_clear_child for NO_WINDOW widgets.
+       (gtk_widget_size_allocate): we don't need a queue_clear on changing
+       allocations of !NO_WINDOW widgets, we do still need a full redraw for
+       them though.
+
+       * gtk/gtklabel.c (gtk_label_set_text): check whether the new string
+       actually differs from the original.
+
 Tue Jan 12 22:50:44 PST 1999 Manish Singh <yosh@gimp.org>
 
        * acinclude.m4
index 792519b0eb441aea8294eb4132b6fa1711c58890..58d92d6bc0c653d964528d43731e38174c960887 100644 (file)
@@ -1,3 +1,16 @@
+Wed Jan 13 13:28:00 1999  Tim Janik  <timj@gtk.org>
+
+       * gtk/gtkwidget.c: eliminate queue_clears or queue_draws where we know
+       that expose events will be generated.
+       (gtk_widget_map): only queue_draw for NO_WINDOW widgets.
+       (gtk_widget_unmap): only queue_clear_child for NO_WINDOW widgets.
+       (gtk_widget_size_allocate): we don't need a queue_clear on changing
+       allocations of !NO_WINDOW widgets, we do still need a full redraw for
+       them though.
+
+       * gtk/gtklabel.c (gtk_label_set_text): check whether the new string
+       actually differs from the original.
+
 Tue Jan 12 22:50:44 PST 1999 Manish Singh <yosh@gimp.org>
 
        * acinclude.m4
index 792519b0eb441aea8294eb4132b6fa1711c58890..58d92d6bc0c653d964528d43731e38174c960887 100644 (file)
@@ -1,3 +1,16 @@
+Wed Jan 13 13:28:00 1999  Tim Janik  <timj@gtk.org>
+
+       * gtk/gtkwidget.c: eliminate queue_clears or queue_draws where we know
+       that expose events will be generated.
+       (gtk_widget_map): only queue_draw for NO_WINDOW widgets.
+       (gtk_widget_unmap): only queue_clear_child for NO_WINDOW widgets.
+       (gtk_widget_size_allocate): we don't need a queue_clear on changing
+       allocations of !NO_WINDOW widgets, we do still need a full redraw for
+       them though.
+
+       * gtk/gtklabel.c (gtk_label_set_text): check whether the new string
+       actually differs from the original.
+
 Tue Jan 12 22:50:44 PST 1999 Manish Singh <yosh@gimp.org>
 
        * acinclude.m4
index b700db6ed921e8985b5aa05ce9e24aa5d2e69c16..01f219e9db5df2cf0fcd6e76fe8b91f4426f8f03 100644 (file)
@@ -29,6 +29,8 @@
 #undef HAVE_SYS_SELECT_H
 #undef HAVE_XCONVERTCASE
 
+#undef WITH_SYMBOL_UNDERSCORE
+
 #undef NO_FD_SET
 
 #undef RESOURCE_BASE
index 8015fecf415f7c88520477eec51a64e7100f30ad..0c53fa73fb26de85c202440dbf9afa3d4b232070 100644 (file)
@@ -250,14 +250,17 @@ gtk_label_set_text (GtkLabel *label,
   g_return_if_fail (label != NULL);
   g_return_if_fail (GTK_IS_LABEL (label));
   g_return_if_fail (str != NULL);
-  
-  /* Convert text to wide characters */
-  len = strlen (str);
-  str_wc = g_new (GdkWChar, len + 1);
-  wc_len = gdk_mbstowcs (str_wc, str, len + 1);
-  str_wc[wc_len] = '\0';
-  
-  gtk_label_set_text_internal (label, g_strdup (str), str_wc);
+
+  if (!label->label || strcmp (label->label, str))
+    {
+      /* Convert text to wide characters */
+      len = strlen (str);
+      str_wc = g_new (GdkWChar, len + 1);
+      wc_len = gdk_mbstowcs (str_wc, str, len + 1);
+      str_wc[wc_len] = '\0';
+      
+      gtk_label_set_text_internal (label, g_strdup (str), str_wc);
+    }
 }
 
 void
index 715d3bb60cf17f06fb6db351ecbc82a56a266365..e3ca39afb014cd3b1792f9e51dd6d344c5aa71d7 100644 (file)
@@ -1578,7 +1578,8 @@ gtk_widget_map (GtkWidget *widget)
 
       gtk_signal_emit (GTK_OBJECT (widget), widget_signals[MAP]);
 
-      gtk_widget_queue_draw (widget);
+      if (GTK_WIDGET_NO_WINDOW (widget))
+       gtk_widget_queue_draw (widget);
     }
 }
 
@@ -1598,7 +1599,8 @@ gtk_widget_unmap (GtkWidget *widget)
   
   if (GTK_WIDGET_MAPPED (widget))
     {
-      gtk_widget_queue_clear_child (widget);
+      if (GTK_WIDGET_NO_WINDOW (widget))
+       gtk_widget_queue_clear_child (widget);
       gtk_signal_emit (GTK_OBJECT (widget), widget_signals[UNMAP]);
     }
 }
@@ -2380,7 +2382,6 @@ gtk_widget_size_allocate (GtkWidget       *widget,
   else if (widget->allocation.width != real_allocation.width ||
           widget->allocation.height != real_allocation.height)
     {
-      gtk_widget_queue_clear_child (widget);
       needs_draw = TRUE;
     }
 
index e69de29bb2d1d6434b8b29ae775ad8c2e48c5391..9788f70238c91894045d22366fa941580826c3c1 100644 (file)
@@ -0,0 +1 @@
+timestamp